<!DOCTYPE html>
<html lang="en">
<head>
<title>学而阅读</title> <#include "/common/head.ftl"/>

<script type="text/javascript">
	$(function() {
		$("#payType").val("1");
		$("#payAmount").val("20");
		//选择购买数量
		$(".num-select a").on("click", function() {
			$(this).addClass("active").siblings().removeClass("active");
			var payAmount = $(this).attr("data-value");
			$("#payAmount").val(payAmount);
			$("#displayAmount").html(payAmount);
		});

		//选择支付方式
		$(".pay-way a").on("click", function() {
			$(this).addClass("select").siblings().removeClass("select");
			var payType = $(this).attr("data-value");
			$("#payType").val(payType);
		});
		//判断是否是微信内支付
		var iwx = isWeixin();
		$("#isWeixin").val(iwx);
	});
	function payClick() {
		$("#form1").submit();
	}
	function isWeixin() {
		var ua = navigator.userAgent.toLowerCase();
		if (ua.match(/MicroMessenger/i) == "micromessenger") {
			return true;
		} else {
			return false;
		}
	}
</script>

</head>
<body>
	<#include "/common/header.ftl"/>
	<!-- 主题内容 -->
	<form action="${path}/recharge/pay" method="post" id="form1">
		<div class="rechange">
			<div class="user f42">
				客&nbsp;&nbsp;户&nbsp;号：<span>${(readerpcuser.userNo)!''}</span>
			</div>
			<div class="money f42">
				账户余额：<span>${(readerpcuser.userGold)!0}</span>书币
			</div>
			<div class="num f42">
				<span class="num-title">充值金额：</span>
				<div class="num-select">
					<a class="coin fl tc active" data-value="20"><span class="">20元</span><span
						class="f32">2000书币</span></a> <a class="coin fl tc" data-value="30"><span
						class="">30元</span><span class="f32">3500书币</span></a> <a
						class="coin fl tc" data-value="50"><span class="">50元</span><span
						class="f32">6000书币</span></a> <a class="coin fl tc" data-value="100"><span
						class="">100元</span><span class="f32">12500书币</span></a>
				</div>
				<div class="tip f36">
					微信扫码充值大赠送啦~充的越多送的越多：一次性<span style="color: #f00">充值30送5,充50送10,充100送25</span>
				</div>
				<div class="clearfix"></div>
			</div>
			<div class="pay">
				<div class="pay-way f42">
					<a class="dlb fl select" data-value="1"><img src="${path}/image/alipay.png"></a>
				</div>
				<div class="payment f42">
					应付金额:<span id="displayAmount">20</span>元
				</div>
			</div>
			<input type="hidden" id="payAmount" name="payAmount" value="0">
			<input type="hidden" id="payType" name="payType" value="0"> <input
				type="hidden" id="isWeixin" name="isWeixin" value="false"> <a
				href="#" class="btn-pay f48 cfff tc" onclick="payClick();">立即支付</a>
		</div>
	</form>
	<#include "/common/footer.ftl"/>
</body>
</html>